🌎 rns.kin.earth git 🌍
Commit b5cb3a65dd4e398f536d5accb83982ddf40d372a
Parents : c79cb3a
Author : Mark Qvist <mark@unsigned.io>
Date : 2023-09-30T00:25:47+02:00
Fixed announce queue not clearing all announces with exceeded retry limit at the same time
Changes
Diff
diff --git a/RNS/Transport.py b/RNS/Transport.py
index 648ca42d..8099f4d0 100755
--- a/RNS/Transport.py
+++ b/RNS/Transport.py
@@ -352,12 +352,12 @@ class Transport:
# Process announces needing retransmission
if time.time() > Transport.announces_last_checked+Transport.announces_check_interval:
+ completed_announces = []
for destination_hash in Transport.announce_table:
announce_entry = Transport.announce_table[destination_hash]
if announce_entry[2] > Transport.PATHFINDER_R:
RNS.log("Completed announce processing for "+RNS.prettyhexrep(destination_hash)+", retry limit reached", RNS.LOG_EXTREME)
- Transport.announce_table.pop(destination_hash)
- break
+ completed_announces.append(destination_hash)
else:
if time.time() > announce_entry[1]:
announce_entry[1] = time.time() + Transport.PATHFINDER_G + Transport.PATHFINDER_RW
@@ -404,6 +404,10 @@ class Transport:
Transport.announce_table[destination_hash] = held_entry
RNS.log("Reinserting held announce into table", RNS.LOG_DEBUG)
+ for destination_hash in completed_announces:
+ if destination_hash in Transport.announce_table:
+ Transport.announce_table.pop(destination_hash)
+
Transport.announces_last_checked = time.time()
Served by rngit 1.5.2 - Generated in 0.05s